home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 May: Tool Chest / Developer CD Series May 1996 (Tool Chest) (Apple Computer) (1996).iso / Sample Code / Standard File Samples / CustomGetFolder / CustomGetFolder.r < prev    next >
Encoding:
Text File  |  1995-06-16  |  3.4 KB  |  128 lines  |  [TEXT/MMCC]

  1. #define SystemSevenOrLater 1
  2. #include "types.r"
  3. #include "BalloonTypes.r"
  4.  
  5.  
  6. /*\
  7. |*| ---------------------------------------------------------------------
  8. |*| StandardGetFile 'DITL' with added Select button
  9. |*| ---------------------------------------------------------------------
  10. \*/
  11. resource 'DITL' (129, purgeable)
  12. {
  13.     {
  14.     /* the standard GetFile dialog */
  15.         /*  1 */ {157, 253, 177, 333}, Button     { enabled, "Open" },
  16.         /*  2 */ {126, 253, 146, 333}, Button     { enabled, "Cancel" },
  17.         /*  3 */ {  0,   0,   0,   0}, HelpItem   { disabled, HMScanhdlg { -6043 } },
  18.         /*  4 */ { 30, 236,  46, 338}, UserItem   { enabled },
  19.         /*  5 */ { 54, 253,  74, 333}, Button     { enabled, "Eject" },
  20.         /*  6 */ { 82, 253, 102, 333}, Button     { enabled, "Desktop" },
  21.         /*  7 */ { 51,  13, 181, 231}, UserItem   { enabled },
  22.         /*  8 */ { 28,  13,  47, 231}, UserItem   { enabled },
  23.         /*  9 */ {113, 252, 114, 334}, Picture    { disabled, 11 },
  24.         
  25.     /* my additions */
  26.         /* 10 */ {  6,  15,  23, 128}, StaticText { disabled, "Select a Folder:" },
  27.         /* 11 */ {  0,   0,   0,   0}, StaticText { disabled, "" },        /* dummy item */
  28.         /* 12 */ {  0,   0,   0,   0}, HelpItem   { disabled, HMScanhdlg { 129 } },
  29.         /* 13 */ {189,  24, 209, 211}, Button     { enabled, "Select" }
  30.     }
  31. };
  32.  
  33.  
  34. /*\
  35. |*| ---------------------------------------------------------------------
  36. |*| StandardPutFile 'DLOG' with extra room Append button
  37. |*| ---------------------------------------------------------------------
  38. \*/
  39. resource 'DLOG' (129, purgeable)
  40.     {
  41.         {0, 0, 215, 344},
  42.         dBoxProc, invisible, noGoAway,
  43.         0, 129, ""
  44.     };
  45.  
  46.  
  47. /*\
  48. |*| ---------------------------------------------------------------------
  49. |*| 'hdlg' for Balloon Help for Append button
  50. |*| ---------------------------------------------------------------------
  51. \*/
  52. resource 'hdlg' (129, purgeable)
  53. {
  54.     2, 12, 0, 0, 0,
  55.     HMSkipItem { },
  56.     {    /* array HDialogArray: 1 elements */
  57.         /* [ 1] */ HMStringResItem { {0, 0}, {0, 0, 0, 0}, 129, 1, 129, 2, 129, 0, 129, 0 },
  58.     }
  59. };
  60.  
  61.  
  62. /*\
  63. |*| ---------------------------------------------------------------------
  64. |*| Balloon Help strings for Append button
  65. |*| ---------------------------------------------------------------------
  66. \*/
  67. resource 'STR#' (129, purgeable)
  68. {
  69.     {    
  70.         /* [1] */
  71.         "To open the selected folder or volume, C"
  72.         "lick this button.",
  73.         /* [2] */
  74.         "To open the selected folder or volume, C"
  75.         "lick this button.  The button is not ava"
  76.         "ilable because no folder or volume is se"
  77.         "ted.",
  78.     }
  79. };
  80.  
  81.  
  82. /*\
  83. |*| ---------------------------------------------------------------------
  84. |*| Strings for Select button
  85. |*| ---------------------------------------------------------------------
  86. \*/
  87. resource 'STR ' (130) {
  88.     "Select"
  89. };
  90.  
  91. resource 'STR ' (131) {
  92.     "Desktop"
  93. };
  94.  
  95.  
  96. /*\
  97. |*| ---------------------------------------------------------------------
  98. |*| 'DITL' for the alert to output the results
  99. |*| ---------------------------------------------------------------------
  100. \*/
  101. resource 'DITL' (128)
  102. {
  103.     {    
  104.         {74, 270, 94, 350}, Button { enabled, "Quit" },
  105.         {74, 175, 94, 255}, Button { enabled, "Again…" },
  106.         {11,  77, 64, 329}, StaticText { disabled, "Good: ^0\nReplace: ^1\nName: ^2" }
  107.     }
  108. };
  109.  
  110.  
  111. /*\
  112. |*| ---------------------------------------------------------------------
  113. |*| 'ALRT' for the alert to output the results
  114. |*| ---------------------------------------------------------------------
  115. \*/
  116. resource 'ALRT' (128)
  117. {
  118.     {180, 100, 286, 468},
  119.     128,
  120.     {    
  121.         OK, visible, silent,
  122.         OK, visible, silent,
  123.         OK, visible, silent,
  124.         OK, visible, silent
  125.     }
  126. };
  127.  
  128.